<%@page import="org.apache.commons.collections.MapIterator"%>
<%@page import="org.apache.commons.collections.map.ListOrderedMap"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import = "java.util.*,com.ibatis.sqlmap.client.SqlMapClient,com.meetablog.util.SqlMapConfig" %>   
				   
<%
	
	//--	검색조건 세팅 start
	HashMap param = new HashMap();	//	검색조건을 담을 해쉬맴 (key, value);
	param.put("JOB","MANAGER");
	param.put("MGR","7839");
	//--	검색조건 세팅 end
	
	//--	SQL 실행 start
	SqlMapClient sqlMap =  SqlMapConfig.getSqlMapClient();

		// 1. queryForList 가져올경우
	ArrayList rs = 	(ArrayList)sqlMap.queryForList("Test.selectTestList",param);	//	실행할 SQL ID, 검색조건(없을경우 null)
	
		// 2. queryForMap 가져올경우
	HashMap map = (HashMap)sqlMap.queryForMap("Test.selectTestList",param,"EMPNO");	//	실행할 SQL ID, 검색조건(없을경우 null), Map 의 키값
	//--	SQL 실행 end

	
%>				    
<table border="1">
	<tr>
		<th>PROD_NM</th>
	</tr>
<%
	for( int i = 0 ; i < rs.size() ; i++){
%>
	<tr>
		<td><%=((HashMap)rs.get(i)).get("PROD_NM") %></td>
	</tr>
<%		
	}
%>
</table>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>


</body>
</html>